//
//  NewViewController.swift
//  SwiftStory
//
//  Created by ZxjMacBookPro on 2020/4/11.
//  Copyright © 2020 ZxjMacBookPro. All rights reserved.
//

import UIKit

class NewViewController: UIViewController {

    let p = Person()
    
    override func viewDidLoad() {
        super.viewDidLoad()

//        p.requested { [weak self] () -> () in
////            self!.view.backgroundColor = UIColor.blue
//            self!.navigationController?.pushViewController(HomeViewCtr(), animated: true);
//        }
        p.requested { () -> () in
            self.navigationController?.pushViewController(HomeViewCtr(), animated: true);
         }
        
        // Do any additional setup after loading the view.
    }
    
    deinit {
        print("销毁了")
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
